//
//  PXLPhoneHelper.h
//  PXL
//
//  Created by Rachel Blackman on 8/9/07.
//  Copyright 2007 Riverdark Studios. All rights reserved.
//

#import <Cocoa/Cocoa.h>

enum {
    PhoneStateUnknown,
    PhoneStateJailed,
    PhoneStateJailbroken,
    PhoneStatePxlJailbroken,
    PhoneStatePxlEnabled
};

@interface PXLPhoneHelper : NSObject {

    id                      _pxlDelegate;
    
    int                     _phoneState;
    int                     _pxlVersion;
    
    bool                    _phoneConnected;
    
    NSString*               _phoneFirmwareBuild;
    NSString*               _phoneFirmwareDisplay;
    NSString*               _phoneFirmwareRestoreURL;
    NSDictionary *          _phoneFirmwareInfo;    
    
    NSString*               _phoneName;
    NSString*               _phoneNumber;
    NSString*               _phoneSerial;
    
    NSNumber*               _pxlLastUpdate;
    
    NSMutableDictionary *   _pxlPackages;    
    NSMutableArray *        _pxlPackageIDs;
}

+ (PXLPhoneHelper *) sharedPhoneHelper;

- (void) setDelegate:(id) delegate;

- (NSString *) phoneName;
- (NSString *) phoneNumber;
- (NSString *) phoneSerial;
- (NSString *) phoneFirmwareDisplay;
- (NSString *) phoneFirmwareBuild;
- (NSString *) phoneFirmwareRestoreURL;

- (BOOL) phoneIsConnected;

- (int) phoneState;
- (int) phonePxlRevision;

- (int) installPxl;
- (void) installPxl2;

- (NSDictionary *) installedPackages;
- (NSArray *) installedPackageIDs;

- (NSDictionary *) parsePxlPackage:(NSString *)package;

- (void) installPackage:(NSString *)packageFile;
- (void) removePackage:(NSString *)packageId;

- (void) installBasePackages;

@end
